package com.crm.controller.zy;

import com.crm.pojo.CrmOrder;
import com.crm.pojo.CrmOrderGoods;
import com.crm.pojo.CrmOrderState;
import com.crm.utils.R;
import com.crm.vo.OrderPageVo;
import com.crm.vo.PageVo;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * Create with IntelliJ IDEA.
 * Description:
 * User: ZY
 * Date: 2023-03-10
 * Time: 18:35
 */
@RestController
@RequestMapping("/order")
@Api(tags = "订单管理",value = "订单管理")
public class OrderController {




    @RequestMapping(value ="/findOrderList",method = RequestMethod.GET)
    @ApiOperation(value = "查询所有的订单接口",notes = "按时间获取所有订单",httpMethod = "GET",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPagecurrentPage", value = "当前页", dataType = "Integer", paramType = "query", example = "1", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "5", required = true),
            @ApiImplicitParam(name = "timeSlot", value = "查询范围", dataType = "string", paramType = "query", example = "all", required = true),
    })
    public R findOrderList(Integer currentPagecurrentPage,Integer pageSize,String timeSlot){
        return null;
    }





    @RequestMapping(value ="/findOrderListByCondition",method = RequestMethod.GET)
    @ApiOperation(value = "按简单条件查询订单接口",notes = "按客户名称、手机号码或者订单编号查询订单",httpMethod = "GET",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPagecurrentPage", value = "当前页", dataType = "Integer", paramType = "query", example = "1", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "5", required = true),
            @ApiImplicitParam(name = "timeSlot", value = "查询范围", dataType = "string", paramType = "query", example = "all", required = true),
            @ApiImplicitParam(name = "condition", value = "查询条件", dataType = "string", paramType = "query", example = "18215779278", required = true),
    })
    public R findOrderListByCondition(Integer currentPagecurrentPage,Integer pageSize,String timeSlot,String condition){
        return null;
    }





    @RequestMapping(value ="/findOrderListByOrderConditions",method = RequestMethod.POST)
    @ApiOperation(value = "按简单条件查询订单接口",notes = "按客户名称、手机号码或者订单编号查询订单",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R findOrderListByOrderConditions(@RequestBody OrderPageVo orderPageVo){
        return null;
    }




    @RequestMapping(value ="/findOrderListByCustomer",method = RequestMethod.GET)
    @ApiOperation(value = "查询客户所有的订单接口",notes = "查询当前客户所有订单",httpMethod = "GET",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    @ApiImplicitParam(name = "customerId", value = "客户id", dataType = "Integer", paramType = "query", example = "1", required = true)

    public R findOrderListByCustomer(Integer customerId){
        return null;
    }




    @RequestMapping(value ="/findOrderListById",method = RequestMethod.GET)
    @ApiOperation(value = "查询客户所有的订单接口",notes = "查询当前客户所有订单",httpMethod = "GET",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "Integer", paramType = "query", example = "1", required = true)

    public R findOrderListById(Integer orderId){
        return null;
    }





    @RequestMapping(value ="/updateOrderStateById",method = RequestMethod.POST)
    @ApiOperation(value = "更改订单状态接口",notes = "根据id更改订单状态",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R updateOrderStateById(@RequestBody CrmOrderState crmOrderState){
        return null;
    }



    @RequestMapping(value ="/addOrderGoodsById",method = RequestMethod.POST)
    @ApiOperation(value = "新增订单商品接口",notes = "新增订单商品接口",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R addOrderGoodsById(@RequestBody CrmOrderGoods crmOrderGoods){
        return null;
    }





    @RequestMapping(value ="/updateOrderGoodsById",method = RequestMethod.POST)
    @ApiOperation(value = "新增订单商品接口",notes = "新增订单商品接口",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R updateOrderGoodsById(@RequestBody CrmOrderGoods crmOrderGoods){
        return null;
    }




    @RequestMapping(value ="/updatedReceiverById",method = RequestMethod.GET)
    @ApiOperation(value = "修改订单商品接口",notes = "根据订单id新增订单商品",httpMethod = "GET",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })

    @ApiImplicitParam(name = "received", value = "新增到款", dataType = "BigDecimal", paramType = "query", example = "100.00", required = true)

    public R updatedReceiverById(BigDecimal received){
        return null;
    }





    @RequestMapping(value ="/addReceivedrById",method = RequestMethod.POST)
    @ApiOperation(value = "新增订单接口",notes = "根据新增订单",httpMethod = "POST",response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=401,message ="用户未授权"),
            @ApiResponse(code=403,message="认证失败"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    public R addReceivedrById(@RequestBody CrmOrder crmOrder){
        return null;
    }
}
